package cn.sykj.car.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 充值记录
 * </p>
 *
 * @author yuhao
 * @since 2021-06-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="CarRecharge对象", description="充值记录")
public class CarRecharge extends Model<CarRecharge> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "充值流水号")
    private String rechargeNo;

    @ApiModelProperty(value = "car_users.id")
    private Integer userId;

    @ApiModelProperty(value = "充值方式：1-现金 2-微信在线  3-微信线下转账 4-银行卡转账 5-其他")
    private Integer payWay;

    @ApiModelProperty(value = "充值金额")
    private Integer amount;

    @ApiModelProperty(value = "支付状态：10-未支付，20-审核成功，30-支付成功，40-支付失败")
    private Integer status;

    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    @ApiModelProperty(value = "支付交易流水号（回调）")
    private String traceNo;

    @ApiModelProperty(value = "微信支付流水号（我们系统生成，传给微信）")
    private String transNo;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "删除标记：0-正常 1-删除")
    @TableLogic
    private Integer delFlag;

    private String updateUser;

    private String createUser;


    public static final String ID = "id";

    public static final String RECHARGE_NO = "recharge_no";

    public static final String USER_ID = "user_id";

    public static final String PAY_WAY = "pay_way";

    public static final String AMOUNT = "amount";

    public static final String STATUS = "status";

    public static final String PAY_TIME = "pay_time";

    public static final String TRACE_NO = "trace_no";

    public static final String TRANS_NO = "trans_no";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String DEL_FLAG = "del_flag";

    public static final String UPDATE_USER = "update_user";

    public static final String CREATE_USER = "create_user";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
